package com.sixth.system.controller;

import com.sixth.core.entity.Banner;
import com.sixth.core.vo.R;
import com.sixth.system.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 轮播图管理控制器
 *
 * @author Stu YH
 * @date Created in 2024/8/23 14:15
 * @description 提供轮播图管理相关的API接口
 */
@Api(tags = "轮播图管理")
@RestController
@RequestMapping("/system/banner")
public class BannerController {
    @Autowired
    private BannerService bannerService;

    /**
     * 获取轮播图列表
     * @return 轮播图列表
     */
    @ApiOperation(value = "获取轮播图列表", notes = "获取所有轮播图的信息")
    @RequestMapping("/getBanner")
    public R<List<Banner>> getBanner() {
        return bannerService.getBanner();
    }
}
